package com.boot.system.wrapper;

import cn.hutool.core.bean.BeanUtil;
import com.boot.framework.common.BaseEntityWrapper;
import com.boot.system.dto.SysRoleDTO;
import com.boot.system.entity.SysRoleEntity;

/**
 * @author yangfan
 * @date 2024/1/7
 * @Description
 */
public class SysRoleWrapper extends BaseEntityWrapper<SysRoleEntity, SysRoleDTO> {
    public static SysRoleWrapper build() {
        return new SysRoleWrapper();
    }

    @Override
    public SysRoleDTO entityDTO(SysRoleEntity entity) {
        return BeanUtil.copyProperties(entity, SysRoleDTO.class);
    }

    @Override
    public SysRoleEntity dtoEntity(SysRoleDTO dto) {
        return BeanUtil.copyProperties(dto, SysRoleEntity.class);
    }
}
